<?php
include "../templates/db/db.php";

$username = htmlspecialchars(trim($_POST['user']));
$password=htmlspecialchars(trim($_POST['password']));

$select='SELECT username, password, id FROM users WHERE username="' . addslashes($username) . '" AND password="' . md5($password) . '"';
$results_select = mysql_query($select);
$row_select=mysql_fetch_assoc($result_select);
$user_id=$row_select['id'];

if($broi != 0){
   echo "<p class='error'>Потребителското име е вече заето!</p>";
   $error=true;
}
?>